import fetch from 'common/src/utils/fetch'

// 查询列表
export function getList(grade, faculty) {
    let authId = localStorage.getItem('activeAuthId');
    return fetch({
        url: '/api/designservice/stastic/result?grade='+grade + '&faculty=' + faculty + '&authId=' + authId,
        method: 'get',
        headers: {
            'Content-Type': 'application/json'
        },
    })
}

export function exportExcel(grade, faculty) {
    let authId = localStorage.getItem('activeAuthId');
    return fetch({
      url: '/api/designservice/stastic/export?grade='+grade + '&faculty=' + faculty + '&authId=' + authId,
      method: 'post',
      headers: { 'Content-Type': 'application/json' },
    })
  }

  export function getReportStatus(key) {
    return fetch({
        url: `/api/designservice/resultPublish/result/${key}`,
        method: 'get',
        showMask: false
    })
  }